#include"My_Vector.h"


void test1()
{
    std::cout << "test start" << std::endl;
    my::vector<int> v;
    size_t cap = v.capacity();
    int n = 10;
    for (int i = 0; i < 10; i++)
    {
        v.push_back(i);
        if (v.capacity() != cap)
        {
            std::cout << cap << std::endl;
            cap = v.capacity();
        }
    }
    
    my::vector<int>::iterator it = v.begin();
    while (it != v.end())
    {
        std::cout << *it<<" ";
        it++;
    }
    std::cout << std::endl;
    for (int i = 0; i < n; i++)
    {
        std::cout << v[0] << " ";
        v.erase(v.begin());
        
    }
    std::cout << std::endl;
    for (int i = 0; i < n; i++)
    {
        v.insert(v.begin(), 9);
    }

    for (auto it : v)
    {
        std::cout << it <<" " ;
    }
    std::cout << std::endl;
    my::vector<int> v2(v.begin(), v.end());
    std::cout <<v2.size()<< std::endl;
    for (auto it : v2)
    {
        std::cout << it << " ";
    }
    std::cout << std::endl;
}

void test2()
{
    my::vector<int> a1 = { 1,2,3,4,5,6,7 };
    for (auto it : a1)
    {
        std::cout << it << " ";
    }
    std::cout << std::endl;
    my::vector<int> a2(a1);
    a2= { 1,1 };
    for (auto it : a2)
    {
        std::cout << it << " ";
    }
    std::cout<<std::endl;
}


int main()
{
    //test1();
    test2();
    return 0;
}